package com.demo.convert.word2html.office2007.support;

import org.apache.poi.xwpf.converter.core.styles.XWPFStylesDocument;
import org.apache.poi.xwpf.converter.xhtml.XHTMLOptions;
import org.apache.poi.xwpf.converter.xhtml.internal.XHTMLMapper;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.apache.xmlbeans.XmlException;
import org.xml.sax.ContentHandler;

import java.io.IOException;

/**
 * @author fenggang.li
 * @create 2019-09-11 13:32
 */
public class ChangeFontXHTMLMapper extends XHTMLMapper {
    public ChangeFontXHTMLMapper(XWPFDocument document, ContentHandler contentHandler, XHTMLOptions options) throws Exception {
        super(document, contentHandler, options);
    }

    @Override
    protected XWPFStylesDocument createStylesDocument(XWPFDocument document) throws XmlException, IOException {
        return new ChangeFontCSSStylesDocument( document, options.isIgnoreStylesIfUnused(), options.getIndent() );
    }
}
